/*
    Project Milestone 3
    by Lorenzo Miori [Lorenzo.Miori@stud-inf.unibz.it,
    Matteo Angriman [Matteo.Angriman@stud-inf.unibz.it],
    Nick Preda [Nicolae.Preda@stud-inf.unibz.it]
*/

package DB;
import static DB.GenericDBInterface.*;
import java.sql.Connection;

/**
 *
 * @author Nick
 */
public class CustomerDB extends GenericTableInterface{
    public static final String CUSTOMER_TABLE_NAME = "customer";
    public static final String CUSTOMER_ID = "customer_id";
    public static final String CUSTOMER_RESIDENCE_ADDRESS = "residence_address";
    public static final String CUSTOMER_NAME = "customer_name";
    public static final String CUSTOMER_IDCARD_NUMBER = "idcard_number";
    public static final String CUSTOMER_GENDER = "gender";
    public static final String CUSTOMER_AGE = "age";
    public static final String CUSTOMER_ORDERING[] = {CUSTOMER_ID, CUSTOMER_RESIDENCE_ADDRESS,
                            CUSTOMER_NAME, CUSTOMER_IDCARD_NUMBER, CUSTOMER_GENDER, CUSTOMER_AGE};
    
    /* Attribute types */
    public static int[] CUSTOMER_TYPES = {INT, INT, STRING, STRING, STRING, INT};
    
    public CustomerDB(Connection dbConnection){
        /* The generic interface wants to know some stuff...
         * Basic datatypes, the elementary attribute names */        
        
        super(dbConnection, CUSTOMER_TYPES, CUSTOMER_ID,
                                CUSTOMER_TABLE_NAME, CUSTOMER_ORDERING);
    }
    
}
